package com.niodata.dp.core.context;

import com.niodata.dp.core.usermgr.model.UserInfo;

public class DefaultContext implements Context {

  private final UserInfo userInfo;

  private DefaultContext(UserInfo userInfo) {
    this.userInfo = userInfo;
  }

  public static Context newContext(UserInfo userInfo) {
    return new DefaultContext(userInfo);
  }

  public UserInfo currentUser() {
    return userInfo;
  }
}
